//                       .::::.
//                     .::::::::.
//                    :::::::::::
//                 ..:::::::::::'
//              '::::::::::::'
//                .::::::::::
//           '::::::::::::::..
//                ..::::::::::::.
//              ``::::::::::::::::
//               ::::``:::::::::'        .:::.
//              ::::'   ':::::'       .::::::::.
//            .::::'      ::::     .:::::::'::::.
//           .:::'       :::::  .:::::::::' ':::::.
//          .::'        :::::.:::::::::'      ':::::.
//         .::'         ::::::::::::::'         ``::::.
//     ...:::           ::::::::::::'              ``::.
//    ```` ':.          ':::::::::'                  ::::..
//                       '.:::::'                    ':'````..
package com.xw.controller.manage;

import com.github.pagehelper.PageHelper;
import com.xw.model.BasicSet;
import com.xw.model.DicGroupLimit;
import com.xw.model.News;
import com.xw.service.BasicSetService;
import com.xw.service.NewsService;
import com.xw.service.sysconfig.DicGroupLimitService;
import com.xw.util.JsonData;
import com.xw.util.PropertiesUtil;
import com.xw.vo.NewsVo;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 基础配置
 */
@Controller
@RequestMapping("/manage/basicSet/")
@Scope("prototype")
public class BasicSetController {
    @Resource
    private BasicSetService basicSetService;

    /**
     * 修改
     * @return
     */
    @RequestMapping("edit")
    @ResponseBody
    public Map editAboutUs(BasicSet basicSet){
        return basicSetService.edit(basicSet);
    }

    /**
     * 跳转到编辑页面
     * @return
     */
    @RequestMapping(value = "toBasicSet",method = RequestMethod.GET)
    public String goAboutUs(HttpServletRequest request){
        BasicSet basicSet = basicSetService.findByKeyId("1");
        request.setAttribute("model",basicSet);
        request.setAttribute("url",PropertiesUtil.getProperty("URL"));
        return "basicSet/basicSet";
    }



}
